<?php

class Coneccion{
	
	public $server;
	public $userbd;
	public $passbd;
	public $nombrebd;
	
	public function __construct(){
		
		$this->server = 'localhost';
		$this->userbd = 'root';
		$this->passbd = '';
		$this->nombrebd = 'colegio';
		
	}
	
	public function conectar_bd(){
		
		$con = mysql_connect($this->server, $this->userbd, $this->passbd);
		mysql_select_db($this->nombrebd, $con);
		return $con;
		
	}
	public function desconectar_bd($con){
		mysql_close($con);
	}
}

?>